Hi all,
I have a scenario where I need to send a custom report as an attachment to numerous customers via email.
Is there a way to get the report parameter using only the SetTableView() procedure without showing the RunRequestpage to the user and let the user press OK.
I want to run this as a job Queue.
Many thanks
Hi Avinash,
This is my solution.
I used this link to get the Report Parameter
docs.microsoft.com/.../reportinstance-runrequestpage-method
The out put will be something like this
'<?xml version="1.0" standalone="yes"?><ReportParameters name="Order Email" id="50118"><Options><Field name="NoOfCopies">0</Field><Field name="ShowInternalInfo">false</Field><Field name="LogInteraction">true</Field><Field name="ShowCorrectionLines">false</Field><Field name="ShowLotSN">false</Field><Field name="DisplayAssemblyInformation">false</Field></Options><DataItems><DataItem name="Incoming Order ">VERSION(1) SORTING(Field3,Field1) WHERE(Field43=1(%1),Field120=1(0))</DataItem><DataItem name="CopyLoop">VERSION(1) SORTING(Field1)</DataItem><DataItem name="PageLoop">VERSION(1) SORTING(Field1)</DataItem><DataItem name="DimensionLoop1">VERSION(1) SORTING(Field1)</DataItem><DataItem name="Incoming Order Line">VERSION(1) SORTING(Field3,Field4)</DataItem><DataItem name="DimensionLoop2">VERSION(1) SORTING(Field1)</DataItem><DataItem name="DisplayAsmInfo">VERSION(1) SORTING(Field1)</DataItem><DataItem name="Total">VERSION(1) SORTING(Field1)</DataItem><DataItem name="Total2">VERSION(1) SORTING(Field1)</DataItem><DataItem name="ItemTrackingLine">VERSION(1) SORTING(Field1)</DataItem><DataItem name="TotalItemTracking">VERSION(1) SORTING(Field1)</DataItem></DataItems></ReportParameters>';
I added the Parameter as a Label to my code unit and replaced the filters that I want to use with StrSubstNo and passed that through as the parameter. (Not the best method, but it does work.)
Here is another reply I got from another forum.
www.dynamicsuser.net/.../76232
Hope it helps
Hi Hein,
Did you figure out any solution?
I have a similar scenario where I want to filter record before I call Report.RunRequestPage() and pass it to request page.
How can I generate report request parameters through code and pass it to RunRequestPage function?
Thanks,
Hi, How about using the Report.RunRequestPage([Text]) method?
Here are a few examples:
Hope this will help.
Thanks.
ZHU
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156