awslabs / amazon-quicksight-embedding-sdk

A SDK to help users embed QuickSight dashboards on other pages.
Apache License 2.0
171 stars 40 forks source link

The 'Generate PDF' option does not appear on all dashboards #224

Closed emilMircea closed 1 month ago

emilMircea commented 1 month ago

Expected Behavior

Each dashboard should have a 'Generate PDF' option available.

Actual Behavior

Of the two dashboards, one has the "Generate PDF" option available while the other one does not.

No Generate PDF Option Dashboard

with genereate pdf

Frontend implementation using the Amazon QuickSight SDK.


const QuickSightEmbed: React.FC<QuickSightEmbedProps> = ({ embedURL }) => {
    const containerRef = useRef<HTMLDivElement>(null);

    useEffect(() => {
        const embedDashboard = async () => {

            const embeddingContext = await createEmbeddingContext();

            const frameOptions = {
                url: embedURL,
                container: containerRef.current,
                resizeHeightOnSizeChangedEvent: true,
            };

            const contentOptions = {
                locale: "en-US",
                toolbarOptions: {
                    export: true,
                    undoRedo: true,
                    reset: true,
                }
            };

            await embeddingContext.embedDashboard(frameOptions, contentOptions);
        };

        embedDashboard();
    }, [embedURL]);

    return <div className="quicksight-embed" ref={containerRef} />;
};
lvrau-amzn commented 1 month ago

I have a couple of questions for the dashboard that's missing the export to PDF button:

  1. When publishing the dashboard, have you ensured that under the Advanced publish options that the Enable PDF download option is enabled?
  2. Does the embedded dashboard have a dataset with either RLS or CLS tags and is the embedded dashboard URL generated for anonymous users?
emilMircea commented 1 month ago

Thank you for the questions. Here are the answers.

  1. The "Enable PDF download" option is enabled.
  2. The dataset is with RLS tags and the embedded dashboard URL is generated for anonymous users.

Enable PDF option enabled

lvrau-amzn commented 1 month ago

From our end, we've confirmed that this is expected behavior where anonymous users with a dataset that has RLS will not show the "Generate PDF" button. We'll mark this issue as an enhancement and pick it up based on prioritization

emilMircea commented 1 month ago

Thanks a lot for the reply and for marking it as an enhancement. I will close the issue now. Have a nice day!