0

I have a need to send the same subscription to different people in different format.

I have the data driven subscription query working correctly. Some users need the report rendered and emailed as a PDF and some need it as Excel.

So I simply have a case statement which say something like :

case when username = 'X' then 'EXCELOPENXML' else 'PDF' end as render_format

I then use this under Delivery Options for Email and the Render Format source is "Get value from dataset" and value/Field is render_format

All records that have EXCELOPENXML as render format are delivered successfully but I get the following error in the log file for PDF rendering!

Success: False, Status: The value 'PDF' is not valid for setting 'Render Format'.

I've looked at the report server config file and the render name there is PDF.

Seems rather straight forward, but I'm scratching my head with this simple task.

what is the render format name for a PDF please, cause PDF itself does not work!

The report is delivered as PDF if I use the drop down value as PDF.

Strangely, if I use MHTML it works fine!

Harry
  • 2,636
  • 1
  • 17
  • 29
  • 1
    I don't have Enterprise to test but the default name is just `'PDF'`. Unless the config has been changed (but you said you checked that). Only thing I can think of next would be to add `="[" & Globals!RenderFormat.Name & "]"` using a monospaced font to a textbox on a test report, manually export the test report as PDF and check the output. The `[` and font are just to make it easier to spot spaces etc. – Alan Schofield Aug 16 '23 at 08:51
  • Thanks Alan, absolute legend! That woked .. oddly, the renderformat was -> [PDF (A4 Portrait)] now the pdf subscriptions get delivered as PDF! Please turn your comment into an answer – Harry Aug 16 '23 at 20:55

1 Answers1

1

I don't have Enterprise to test but the default name is just 'PDF'.

Unless the config has been changed (but you said you checked that).

Only thing I can think of next would be to add

="[" & Globals!RenderFormat.Name & "]" 

using a monospaced font to a textbox on a test report, manually export the test report as PDF and check the output.

The [] and font are just to make it easier to spot spaces etc.

Alan Schofield
  • 19,839
  • 3
  • 22
  • 35
  • when developing the report in VS, the renderformat was PDF, so I simply assumed( yes I know - incorrectly) that it was the same when deployed.. only after deplying it to the report server, it show the value of [PDF (A4 Portrait)] . Thanks again. – Harry Aug 16 '23 at 23:00